extends layout

block declarations
    - body_class = 'homepage';
    - include_remote = true;
    - use_angular           = true;
    - angular_app           = "dashboardApp";
    - angular_body_ctrl     = "dashboardCtrl";

block additional_scripts
    script(src="/core/js/plugins/qrcode/qrcode.min.js")
    script(src="/core/js/qrcode-generator.js")
    script(src="/core/js/indexApp.js")

block body
    header
        .container-fluid
            .row
                .col-md-8.col-xs-12
                    img.logo(src="/core/css/img/logo.png")
                    h1 MediacenterJS
                    -if(allowed === 'no')
                        h4 Parental lock enabled
                    div.upgrade-right.boxed(ng-show="newVersion && !updating")
                        a.btn.upgrade(ng-click="doUpdate()") New version {{newVersion}} Available
                .col-md-4.hidden-xs
                    #dateandtime
                        date-time.time(format="H:mm:ss")
                        date-time.date(format="dd-MM-yyyy")
    .container-fluid
        .row
            .message(ng-show="updating") Downloading and installing update
                br
                Please wait for the installation to finish...
            ul#tiles(mcjs-library, ng-hide="updating")
                li.tile.mcjs-rc-controllable.col-md-2.col-xs-1(mcjs-library-item, class="{{item.appName}}", ng-repeat="item in apps", style="{{item.tileCSS}}")
                    a(href="{{item.appLink}}", ng-click="openApp($event)").mcjs-rc-clickable
                        img(ng-src="{{item.tileLink}}")
                        span {{item.appName}}
    link(rel='stylesheet', ng-href='{{item.tileCSS}}', ng-if="item.tileCSS", ng-repeat="item in apps")